import type { LoginResult } from '@/types/user'
import { http } from '@/utils/http'
//登录ts
interface login {
  code: string
  encryptedData: string
  iv: string
}
/**
 * @param data 登录参数
 */
export const loginApi = (data: login) => {
  return http({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}



//模拟登录
export const simulateLogin = (phoneNumber: string) => {
  return http<LoginResult>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: {
      phoneNumber,
    },
  })
}
